home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 75 64 63 66 2e 67 6c 61 | 2e 61 63 2e 75 6b 21 6e |udcf.gla|.ac.uk!n|
|00000030| 65 77 73 0a 46 72 6f 6d | 3a 20 44 61 76 69 64 20 |ews.From|: David |
|00000040| 50 69 72 69 65 20 3c 64 | 70 69 72 69 65 40 61 65 |Pirie <d|pirie@ae|
|00000050| 72 6f 2e 67 6c 61 2e 61 | 63 2e 75 6b 3e 0a 53 75 |ro.gla.a|c.uk>.Su|
|00000060| 62 6a 65 63 74 3a 20 52 | 65 3a 20 49 20 6e 65 65 |bject: R|e: I nee|
|00000070| 64 20 73 6f 6d 65 20 68 | 65 6c 70 20 75 73 69 6e |d some h|elp usin|
|00000080| 67 20 74 68 65 20 64 6f | 2f 77 68 69 6c 65 20 6c |g the do|/while l|
|00000090| 6f 6f 70 0a 43 6f 6e 74 | 65 6e 74 2d 54 79 70 65 |oop.Cont|ent-Type|
|000000a0| 3a 20 74 65 78 74 2f 70 | 6c 61 69 6e 3b 20 63 68 |: text/p|lain; ch|
|000000b0| 61 72 73 65 74 3d 75 73 | 2d 61 73 63 69 69 0a 4d |arset=us|-ascii.M|
|000000c0| 65 73 73 61 67 65 2d 49 | 44 3a 20 3c 44 4d 74 6e |essage-I|D: <DMtn|
|000000d0| 74 45 2e 49 73 6f 40 75 | 64 63 66 2e 67 6c 61 2e |tE.Iso@u|dcf.gla.|
|000000e0| 61 63 2e 75 6b 3e 0a 54 | 6f 3a 20 6e 61 62 61 62 |ac.uk>.T|o: nabab|
|000000f0| 73 40 71 75 61 6c 63 6f | 6d 6d 2e 63 6f 6d 0a 53 |s@qualco|mm.com.S|
|00000100| 65 6e 64 65 72 3a 20 6e | 65 77 73 40 75 64 63 66 |ender: n|ews@udcf|
|00000110| 2e 67 6c 61 2e 61 63 2e | 75 6b 20 28 4e 65 77 73 |.gla.ac.|uk (News|
|00000120| 29 0a 43 6f 6e 74 65 6e | 74 2d 54 72 61 6e 73 66 |).Conten|t-Transf|
|00000130| 65 72 2d 45 6e 63 6f 64 | 69 6e 67 3a 20 37 62 69 |er-Encod|ing: 7bi|
|00000140| 74 0a 4f 72 67 61 6e 69 | 7a 61 74 69 6f 6e 3a 20 |t.Organi|zation: |
|00000150| 47 6c 61 73 67 6f 77 20 | 55 6e 69 76 65 72 73 69 |Glasgow |Universi|
|00000160| 74 79 2c 20 53 63 6f 74 | 6c 61 6e 64 0a 52 65 66 |ty, Scot|land.Ref|
|00000170| 65 72 65 6e 63 65 73 3a | 20 3c 34 66 70 33 6e 63 |erences:| <4fp3nc|
|00000180| 24 62 68 38 40 69 78 6e | 65 77 73 37 2e 69 78 2e |$bh8@ixn|ews7.ix.|
|00000190| 6e 65 74 63 6f 6d 2e 63 | 6f 6d 3e 20 3c 34 66 70 |netcom.c|om> <4fp|
|000001a0| 67 39 6a 24 64 73 6a 40 | 71 75 61 6c 63 6f 6d 6d |g9j$dsj@|qualcomm|
|000001b0| 2e 63 6f 6d 3e 0a 4d 69 | 6d 65 2d 56 65 72 73 69 |.com>.Mi|me-Versi|
|000001c0| 6f 6e 3a 20 31 2e 30 0a | 44 61 74 65 3a 20 54 68 |on: 1.0.|Date: Th|
|000001d0| 75 2c 20 31 35 20 46 65 | 62 20 31 39 39 36 20 31 |u, 15 Fe|b 1996 1|
|000001e0| 34 3a 34 38 3a 34 39 20 | 47 4d 54 0a 58 2d 4d 61 |4:48:49 |GMT.X-Ma|
|000001f0| 69 6c 65 72 3a 20 4d 6f | 7a 69 6c 6c 61 20 31 2e |iler: Mo|zilla 1.|
|00000200| 31 4e 20 28 4d 61 63 69 | 6e 74 6f 73 68 3b 20 49 |1N (Maci|ntosh; I|
|00000210| 3b 20 36 38 4b 29 0a 58 | 2d 55 72 6c 3a 20 6e 65 |; 68K).X|-Url: ne|
|00000220| 77 73 3a 34 66 70 67 39 | 6a 24 64 73 6a 40 71 75 |ws:4fpg9|j$dsj@qu|
|00000230| 61 6c 63 6f 6d 6d 2e 63 | 6f 6d 0a 0a 6e 61 62 61 |alcomm.c|om..naba|
|00000240| 62 73 40 71 75 61 6c 63 | 6f 6d 6d 2e 63 6f 6d 20 |bs@qualc|omm.com |
|00000250| 28 4e 61 73 73 65 72 20 | 41 62 62 61 73 69 29 20 |(Nasser |Abbasi) |
|00000260| 77 72 6f 74 65 3a 0a 3e | 49 6e 20 61 72 74 69 63 |wrote:.>|In artic|
|00000270| 6c 65 20 3c 34 66 70 33 | 6e 63 24 62 68 38 40 69 |le <4fp3|nc$bh8@i|
|00000280| 78 6e 65 77 73 37 2e 69 | 78 2e 6e 65 74 63 6f 6d |xnews7.i|x.netcom|
|00000290| 2e 63 6f 6d 3e 2c 20 6c | 65 77 6b 62 6a 40 69 78 |.com>, l|ewkbj@ix|
|000002a0| 2e 6e 65 74 63 6f 6d 2e | 63 6f 20 0a 3e 73 61 79 |.netcom.|co .>say|
|000002b0| 73 2e 2e 2e 0a 3e 3e 0a | 3e 3e 49 20 6e 65 65 64 |s....>>.|>>I need|
|000002c0| 20 73 6f 6d 65 20 68 65 | 6c 70 20 74 6f 20 64 65 | some he|lp to de|
|000002d0| 76 65 6c 6f 70 20 61 20 | 73 69 6d 70 6c 65 20 70 |velop a |simple p|
|000002e0| 72 6f 67 72 61 6d 20 75 | 73 69 6e 67 20 74 68 65 |rogram u|sing the|
|000002f0| 20 64 6f 2f 77 68 69 6c | 65 20 6c 6f 6f 70 0a 3e | do/whil|e loop.>|
|00000300| 3e 70 6c 65 61 73 65 2e | 0a 3e 3e 0a 2e 2e 2e 0a |>please.|.>>.....|
|00000310| 3e 3e 20 20 20 20 74 68 | 65 20 70 72 6f 62 6c 65 |>> th|e proble|
|00000320| 6d 20 69 73 20 61 73 20 | 66 6f 6c 6c 6f 77 73 3a |m is as |follows:|
|00000330| 0a 3e 3e 0a 3e 3e 20 20 | 20 20 44 65 76 65 6c 6f |.>>.>> | Develo|
|00000340| 70 20 61 20 63 2b 2b 20 | 70 72 6f 67 72 61 6d 20 |p a c++ |program |
|00000350| 74 68 61 74 20 77 69 6c | 6c 20 69 6e 70 75 74 20 |that wil|l input |
|00000360| 74 68 65 20 6d 69 6c 65 | 73 20 64 72 69 76 65 6e |the mile|s driven|
|00000370| 20 61 6e 64 20 67 61 6c | 6c 6f 6e 73 0a 3e 3e 75 | and gal|lons.>>u|
|00000380| 73 65 64 20 66 6f 72 20 | 65 61 63 68 20 74 61 6e |sed for |each tan|
|00000390| 6b 66 75 6c 2e 20 20 54 | 68 65 20 70 72 6f 67 72 |kful. T|he progr|
|000003a0| 61 6d 20 73 68 6f 75 6c | 64 20 63 61 6c 63 75 6c |am shoul|d calcul|
|000003b0| 61 74 65 20 61 6e 64 20 | 64 69 73 70 6c 61 79 20 |ate and |display |
|000003c0| 74 68 65 0a 3e 3e 6d 69 | 6c 65 73 20 70 65 72 20 |the.>>mi|les per |
|000003d0| 67 61 6c 6c 6f 6e 20 6f | 62 74 61 69 6e 65 64 20 |gallon o|btained |
|000003e0| 66 6f 72 20 65 61 63 68 | 20 74 61 6e 6b 66 75 6c |for each| tankful|
|000003f0| 2e 20 20 41 66 74 65 72 | 20 70 72 6f 63 65 73 73 |. After| process|
|00000400| 69 6e 67 20 61 6c 6c 20 | 69 6e 70 75 74 0a 3e 3e |ing all |input.>>|
|00000410| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 2c 20 74 68 65 |informat|ion, the|
|00000420| 20 70 72 6f 67 72 61 6d | 20 73 68 6f 75 6c 64 20 | program| should |
|00000430| 63 61 6c 63 75 6c 61 74 | 65 20 61 6e 64 20 70 72 |calculat|e and pr|
|00000440| 69 6e 74 20 74 68 65 20 | 63 6f 6d 62 69 6e 65 64 |int the |combined|
|00000450| 20 6d 69 6c 65 73 0a 3e | 3e 70 65 72 20 67 61 6c | miles.>|>per gal|
|00000460| 6c 6f 6e 20 6f 62 74 61 | 69 6e 65 64 20 66 6f 72 |lon obta|ined for|
|00000470| 20 61 6c 6c 20 74 61 6e | 6b 66 75 6c 73 2e 0a 2e | all tan|kfuls...|
|00000480| 2e 2e 2e 2e 0a 3e 48 6f | 77 20 61 62 6f 75 74 20 |.....>Ho|w about |
|00000490| 69 66 20 79 6f 75 20 67 | 65 74 20 74 68 65 20 6c |if you g|et the l|
|000004a0| 6f 67 69 63 20 6f 66 20 | 74 68 65 20 70 72 6f 67 |ogic of |the prog|
|000004b0| 72 61 6d 20 61 6e 64 20 | 79 6f 75 20 61 70 70 6c |ram and |you appl|
|000004c0| 79 20 74 68 65 20 43 20 | 63 6f 64 65 20 0a 3e 66 |y the C |code .>f|
|000004d0| 6f 72 20 69 74 3f 20 28 | 54 68 69 73 20 77 61 79 |or it? (|This way|
|000004e0| 20 49 20 77 6f 6e 27 74 | 20 74 61 6b 65 20 61 6c | I won't| take al|
|000004f0| 6c 20 74 68 65 20 66 75 | 6e 20 66 72 6f 6d 20 79 |l the fu|n from y|
|00000500| 6f 75 72 20 73 63 68 6f | 6f 6c 20 68 6f 6d 65 77 |our scho|ol homew|
|00000510| 6f 72 6b 20 0a 3e 61 73 | 73 69 67 6e 6d 65 6e 74 |ork .>as|signment|
|00000520| 20 3a 29 0a 3e 0a 3e 54 | 68 65 20 77 61 79 20 79 | :).>.>T|he way y|
|00000530| 6f 75 20 73 74 61 72 74 | 20 70 72 6f 67 72 61 6d |ou start| program|
|00000540| 6d 69 6e 67 20 74 68 69 | 6e 67 73 20 6c 69 6b 65 |ming thi|ngs like|
|00000550| 20 74 68 69 73 20 69 73 | 20 74 6f 20 77 72 69 74 | this is| to writ|
|00000560| 65 20 74 68 65 20 6c 6f | 67 69 63 20 6f 75 74 2c |e the lo|gic out,|
|00000570| 20 0a 3e 74 68 65 6e 20 | 6c 61 74 65 72 20 6f 6e | .>then |later on|
|00000580| 20 79 6f 75 20 74 61 6b | 65 20 74 68 61 74 20 61 | you tak|e that a|
|00000590| 6e 64 20 77 72 69 74 65 | 20 69 74 20 69 6e 20 74 |nd write| it in t|
|000005a0| 68 65 20 6c 61 6e 67 61 | 75 67 65 20 6f 66 20 79 |he langa|uge of y|
|000005b0| 6f 75 72 20 63 68 6f 69 | 63 65 2e 0a 3e 0a 3e 54 |our choi|ce..>.>T|
|000005c0| 68 65 20 6c 6f 67 69 63 | 20 63 61 6e 20 62 65 20 |he logic| can be |
|000005d0| 77 72 69 74 74 65 6e 20 | 69 6e 20 45 6e 67 6c 69 |written |in Engli|
|000005e0| 73 68 20 6c 69 6b 65 20 | 6c 61 6e 67 61 75 67 65 |sh like |langauge|
|000005f0| 20 74 6f 20 6d 61 6b 65 | 20 69 74 20 63 6c 65 61 | to make| it clea|
|00000600| 72 20 28 79 6f 75 20 0a | 3e 6d 75 73 74 20 75 73 |r (you .|>must us|
|00000610| 65 20 64 6f 2f 77 68 69 | 6c 65 2c 20 79 6f 75 20 |e do/whi|le, you |
|00000620| 73 61 79 2e 2e 2e 29 20 | 73 6f 20 3a 0a 3e 20 20 |say...) |so :.> |
|00000630| 20 20 20 20 54 6f 74 61 | 6c 5f 4d 69 6c 65 73 5f | Tota|l_Miles_|
|00000640| 50 65 72 5f 47 61 6c 6c | 6f 6e 20 3a 3d 20 54 6f |Per_Gall|on := To|
|00000650| 74 61 6c 5f 4d 69 6c 65 | 73 5f 50 65 72 5f 47 61 |tal_Mile|s_Per_Ga|
|00000660| 6c 6c 6f 6e 20 2b 20 4d | 69 6c 65 73 5f 50 65 72 |llon + M|iles_Per|
|00000670| 5f 47 61 6c 6c 6f 6e 0a | 3e 20 20 20 20 20 20 4f |_Gallon.|> O|
|00000680| 75 74 70 75 74 20 22 54 | 68 65 20 6d 69 6c 65 73 |utput "T|he miles|
|00000690| 20 2f 20 67 61 6c 6c 6f | 6e 20 66 6f 72 20 74 68 | / gallo|n for th|
|000006a0| 69 73 20 74 61 6e 6b 20 | 77 61 73 22 20 4d 69 6c |is tank |was" Mil|
|000006b0| 65 73 5f 50 65 72 5f 47 | 61 6c 6c 6f 6e 0a 3e 20 |es_Per_G|allon.> |
|000006c0| 20 20 20 20 20 4e 75 6d | 62 65 72 5f 4f 66 5f 49 | Num|ber_Of_I|
|000006d0| 74 65 72 61 74 69 6f 6e | 73 20 3a 3d 20 4e 75 6d |teration|s := Num|
|000006e0| 62 65 72 5f 4f 66 5f 49 | 74 65 72 61 74 69 6f 6e |ber_Of_I|teration|
|000006f0| 73 20 2b 20 31 0a 3e 20 | 20 20 45 4e 44 20 49 46 |s + 1.> | END IF|
|00000700| 0a 3e 0a 3e 20 57 48 49 | 4c 45 20 28 20 47 61 6c |.>.> WHI|LE ( Gal|
|00000710| 6c 6f 6e 73 5f 55 73 65 | 64 20 4e 6f 74 20 45 71 |lons_Use|d Not Eq|
|00000720| 75 61 6c 20 2d 31 20 29 | 0a 3e 0a 3e 20 49 46 20 |ual -1 )|.>.> IF |
|00000730| 4e 75 6d 62 65 72 5f 4f | 66 5f 49 6e 74 65 72 61 |Number_O|f_Intera|
|00000740| 74 69 6f 6e 73 20 47 72 | 65 61 74 65 72 20 74 68 |tions Gr|eater th|
|00000750| 61 6e 20 30 20 54 48 45 | 4e 20 0a 2a 2a 2a 2a 2a |an 0 THE|N .*****|
|00000760| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000770| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000780| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000790| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000007a0| 2a 20 0a 3e 20 20 20 20 | 4d 69 6c 65 73 5f 50 65 |* .> |Miles_Pe|
|000007b0| 72 5f 47 61 6c 6c 6f 6e | 20 3a 3d 20 54 6f 74 61 |r_Gallon| := Tota|
|000007c0| 6c 5f 4d 69 6c 65 73 5f | 50 65 72 5f 47 61 6c 6c |l_Miles_|Per_Gall|
|000007d0| 6f 6e 20 2f 20 4e 75 6d | 62 65 72 5f 4f 66 2d 49 |on / Num|ber_Of-I|
|000007e0| 74 65 72 61 74 69 6f 6e | 73 0a 2a 2a 2a 2a 2a 2a |teration|s.******|
|000007f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000800| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000810| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000820| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000830| 0a 3e 20 20 20 20 4f 75 | 74 70 75 74 20 22 54 68 |.> Ou|tput "Th|
|00000840| 65 20 6f 76 65 72 61 6c | 6c 20 61 76 65 72 61 67 |e overal|l averag|
|00000850| 65 20 6d 69 6c 65 73 2f | 67 61 6c 6c 6f 6e 20 77 |e miles/|gallon w|
|00000860| 61 73 20 22 20 4d 69 6c | 65 73 5f 50 65 72 5f 47 |as " Mil|es_Per_G|
|00000870| 61 6c 6c 6f 6e 0a 3e 20 | 45 4c 53 45 0a 3e 20 20 |allon.> |ELSE.> |
|00000880| 20 20 4f 75 74 70 75 74 | 20 22 4e 6f 20 64 61 74 | Output| "No dat|
|00000890| 61 20 73 75 70 70 6c 69 | 65 64 20 66 6f 72 20 70 |a suppli|ed for p|
|000008a0| 72 6f 67 72 61 6d 22 0a | 3e 20 45 4e 44 20 49 46 |rogram".|> END IF|
|000008b0| 0a 3e 0a 3e 20 0a 3e 0a | 3e 4e 61 73 73 65 72 20 |.>.> .>.|>Nasser |
|000008c0| 20 20 20 20 20 20 20 20 | 0a 2e 2e 2e 2e 2e 2e 2e | |........|
|000008d0| 2e 2e 0a 54 68 65 20 73 | 74 65 70 20 77 68 69 63 |...The s|tep whic|
|000008e0| 68 20 49 27 76 65 20 65 | 6e 63 6c 6f 73 65 64 20 |h I've e|nclosed |
|000008f0| 69 6e 20 72 6f 77 73 20 | 6f 66 20 2a 2a 2a 2a 2a |in rows |of *****|
|00000900| 2a 2a 2a 20 69 73 20 71 | 75 69 74 65 20 77 72 6f |*** is q|uite wro|
|00000910| 6e 67 2e 0a 54 68 65 20 | 74 6f 74 61 6c 20 6d 69 |ng..The |total mi|
|00000920| 6c 65 73 2f 67 61 6c 6c | 6f 6e 20 3d 20 74 6f 74 |les/gall|on = tot|
|00000930| 61 6c 4d 69 6c 65 73 2f | 74 6f 74 61 6c 47 61 6c |alMiles/|totalGal|
|00000940| 6c 6f 6e 73 2e 20 0a 09 | 09 09 09 09 20 20 20 20 |lons. ..|.... |
|00000950| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3d 20 | | = |
|00000960| 28 4d 31 2b 4d 32 2b 2e | 2e 2e 2b 4d 6e 29 2f 28 |(M1+M2+.|..+Mn)/(|
|00000970| 47 31 2b 47 32 2b 2e 2e | 2e 2b 47 6e 29 0a 54 68 |G1+G2+..|.+Gn).Th|
|00000980| 69 73 20 64 6f 65 73 20 | 4e 4f 54 20 3d 20 28 4d |is does |NOT = (M|
|00000990| 31 2f 47 31 20 2b 20 4d | 32 2f 47 32 20 2b 20 2e |1/G1 + M|2/G2 + .|
|000009a0| 2e 2e 20 2b 4d 6e 2f 47 | 6e 29 2f 6e 2c 20 61 73 |.. +Mn/G|n)/n, as|
|000009b0| 20 69 6d 70 6c 69 65 64 | 20 69 6e 20 4e 61 73 73 | implied| in Nass|
|000009c0| 65 72 27 73 20 70 73 65 | 75 64 6f 63 6f 64 65 20 |er's pse|udocode |
|000009d0| 61 62 6f 76 65 2e 0a 0a | 44 61 76 69 64 20 50 69 |above...|David Pi|
|000009e0| 72 69 65 0a 0a 0a | |rie... | |
+--------+-------------------------+-------------------------+--------+--------+